package com.ship.dispatch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.common.datasource.annotation.Slave;
import com.ship.dispatch.bean.Compatibility.QueryShipAffiliatedDetailsRq;
import com.ship.dispatch.bean.Compatibility.QueryShipAffiliatedPortCollectRq;
import com.ship.dispatch.bean.Compatibility.QueryShipAffiliatedToPortRq;
import com.ship.dispatch.bean.Compatibility.QueryShipToPortRq;
import com.ship.dispatch.bean.Compatibility.vo.*;
import com.ship.dispatch.bean.DomesticVesselVoyage;
import com.ship.dispatch.bean.SpBoatsVoyageMessage;
import com.ship.dispatch.bean.boats.QueryShipInsideInfo;
import com.ship.dispatch.bean.boats.info.QueryBoatsVoyageMessagesInfo;
import com.ship.dispatch.bean.boats.info.QueryMonthlyCountInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BoatsVoyageMessageMapper extends BaseMapper<SpBoatsVoyageMessage> {

    List<QueryBoatsVoyageMessagesInfo> queryShipExportVolumeTotal(@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<QueryBoatsVoyageMessagesInfo> shipExportVolumeTotalByCountryName(@Param("totalDate") String totalDate);

    List<QueryBoatsVoyageMessagesInfo> queryShipPortExportVolume(@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<QueryBoatsVoyageMessagesInfo> queryhipPortEntranceVolume(@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<QueryBoatsVoyageMessagesInfo> shipQuantityVoyage(@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<DomesticVesselVoyage> monthlyDomesticVesselVoyage(@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<SpBoatsVoyageMessage> queryVoyageNumberByChina(@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<SpBoatsVoyageMessage> queryMonthlyVoyageNumber(@Param("startTime")  String startTime, @Param("endTime")  String endTime,@Param("imoList")  List<String> imoList);

    List<QueryMonthlyCountInfo> queryMonthlyShipCount(@Param("startDate") String startDate, @Param("endDate") String endDate);

    List<QueryBoatsVoyageMessagesInfo> queryDischargeCapacity(@Param("startDate") String startDate, @Param("endDate") String endDate);

    List<QueryBoatsVoyageMessagesInfo> shipEntranceVolumeTotalByCountryName(@Param("totalDate") String totalDate);

    List<QueryShipToPortInfo> queryShipAffiliatedPortPage(@Param("query") QueryShipToPortRq query);

    List<String> queryBoatsPortSisterList(@Param("imo") String imo);

    List<QueryShipToPortInfo> queryShipAffiliatedPortSister(@Param("sisterIdList") List<String> sisterIdList,@Param("receivingStation") String receivingStation);

    List<QueryShipAffiliatedDetailsInfo> countAffiliatedNumber(@Param("query") QueryShipAffiliatedDetailsRq query);

    Integer countBerthNumber(@Param("query") QueryShipAffiliatedDetailsRq query);

    List<QueryShipAffiliatedPortCollectInfo> queryShipAffiliatedPortCollect(@Param("query") QueryShipAffiliatedPortCollectRq query);

    @Slave
    List<String> queryMessageByShipName();

    @Slave
    List<String> queryMessageByImo();

    List<String> queryMessageByTerminal();

    List<String> queryBoatsPortSisterAll(@Param("imoList") List<String> imoList);

    List<QueryShipAffiliatedToPortPageInfo> queryShipAffiliatedToPortPage(@Param("query") QueryShipAffiliatedToPortRq query);

    PortAffiliatedShipInfo queryPortAffiliatedShipByImo(@Param("query") QueryShipAffiliatedDetailsRq query);

    List<QueryPortAffiliatedToShipInfo> queryPortAffiliatedToShip(@Param("query") QueryShipAffiliatedToPortRq query);

    @Slave
    String queryImoByShipName(@Param("shipName") String shipName);

    String queryShipNameByImo(@Param("imo") String imo);

    List<String> queryPortNameList();

    List<QueryShipInsideInfo> queryShipCountryInside(@Param("startDate") String startDate, @Param("endDate") String endDate);

    List<SpBoatsVoyageMessage> queryEntranceTrade(@Param("startDate") String startDate, @Param("endDate") String endDate);

    Integer queryShipNumberByChina(@Param("startDate") String startDate, @Param("endDate") String endDate);

    Integer queryExportVolumeTotal(@Param("startDate") String startDate, @Param("endDate") String endDate);
}
